package cn.bjc.product.domain;

import cn.bjc.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends BaseDomain {
    //产品名
    private String name;
    //产品成本价
    private BigDecimal costprice;
    //产品销售价
    private BigDecimal saleprice;
    //产品详情图链接
    private String resources;
    //产品销量,初始值为0
    private Integer salecount = 0;
    //产品状态,默认为0
    private Integer state = 0;
    //产品下架时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date offsaletime;
    //产品上架时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date onsaletime;
    //产品创建时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createtime = new Date();

    //详情对象,为了接收前端传来的数据
    private ProductDetail productDetail;
    
}
